<template>
    <div>
        <TEditor ref="editor" :modelValue="myContent" v-model="formState.content" :disabled="disabled" @getContent="getContent" />

        <el-button @click="test">测试</el-button>
    </div>
</template>
<script setup>
import {reactive, ref, onMounted} from 'vue'
// 引入
import TEditor from '@/components/TEditor.vue'

const disabled = ref(false)
const formState = reactive({contents: ''})
const getContent = (v) => {
    console.log(v)
    formState.contents = v
}

onMounted(() => {})

const myContent = ref('')
const test = () => {
    myContent.value = '<p>我是谁</p>'

    console.log(myContent.value);
}
</script>

<style lang="scss" scoped></style>
